package com.yb.forum.dao;

import com.yb.forum.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
    int insert(User row);

    int insertSelective(User row);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User row);

    int updateByPrimaryKey(User row);

    /**
     * 参数中带注解的是为SQL传入的参数名,而不带注解的就是java中使用的变量的形式
     * @param username
     * @return
     */
    User selectByUserName(@Param("username") String username);
}